<?php

require_once 'state.php';
require_once 'action.php';
require_once 'event.php';

class Transition {
    private $fromState;
    private $toState;
    private $action;
    private $event;
    private $guard;
    private $id;

    public function  __construct(State $from = null, State $to = null, Event $event = null, Action $action = null, $guard = null) {
        $this->setFromState($from);
        $this->setToState($to);
        $this->setEvent($event);
        $this->setAction($action);
        $this->setGuard($guard);
    }

    public function getFromState() {
        return $this->fromState;
    }

    public function setFromState(State $state) {
        $this->fromState = $state;
    }

    public function getToState() {
        return $this->toState;
    }

    public function setToState(State $state) {
        $this->toState = $state;
    }

    public function getAction(){
        return $this->action;
    }

    public function setAction(Action $action){
        $this->action = $action;
    }

    public function getEvent() {
        return $this->event;
    }

    public function setEvent(Event $event) {
        $this->event = $event;
    }

    public function getGuard() {
        return $this->guard;
    }

    public function setGuard($guard) {
        $this->guard = $guard;
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }
}

?>
